export function formateDate(time){
    if(!time) return ""
    let date = new Date(time)
    let year = formatting(date.getFullYear());
    let month = formatting(date.getMonth());
    let day = formatting(date.getDate());
    let hour = formatting(date.getHours());
    let min = formatting(date.getMinutes());
    let seconds = formatting(date.getSeconds());
    function formatting (k){
       return k = k < 10 ? "0" + k : k
    }
    return `${year}-${month}-${day}  ${hour}:${min}:${seconds}`
}